package com.bestdreamer.map;

import org.junit.Test;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;


public class HashMapTest {

    @Test
    public void main() {
        HashMap<String,Object> map = new HashMap<>();
        map.put("name","wenzhang");
        map.put("name","hkrong");

        System.out.println(map);
        System.out.println(Objects.hash("name"));
        System.out.println(Objects.hash("hkrong"));
//
//        Map<String,Object> nullMap = null;
//        nullMap.put("name","hkrong");
//        nullMap.put("age",12);
//        System.out.println(nullMap);

    }


    @Test
    public void test(){
        HashSet<String> hashSet = new HashSet<>();
        hashSet.add("你"); // i= 0
        hashSet.add("s");
        hashSet.add("测试");
        hashSet.add("777");
    }
}
